<div class="container">
    <div class="row">
        <br>
        <div class="col-md-12">
            <div class="panel-body">
                <form class="form-horizontal" action="/message/modify" method="post" onsubmit="return false">
                    <input type="hidden" name="node_id" value="{{.node_id}}">
                    <div class="form-group">
                        <label class="col-sm-2 control-label"><span class="text-danger"> * </span>消息名称</label>
                        <div class="col-sm-4">
                            <input type="text" name="name" class="form-control" value="{{.message.Name}}" placeholder="消息名称" readonly>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label"><span class="text-danger"> * </span>Exchange</label>
                        <div class="col-sm-4">
                            <select class="form-control" name="mode">
                                <option value="topic" {{if eq .message.Mode "topic"}} selected {{end}}>topic</option>
                                <option value="fanout" {{if eq .message.Mode "fanout"}} selected {{end}}>fanout</option>
                                <option value="direct" {{if eq .message.Mode "direct"}} selected {{end}}>direct</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label"><span class="text-danger"> * </span>是否持久化</label>
                        <div class="col-sm-4">
                            <label class="radio-inline">
                                <input type="radio" name="durable" value="1" {{if eq .message.Durable true}} checked="checked" {{end}} >
                                是
                            </label>
                            <label class="radio-inline">
                                <input type="radio" name="durable" value="0" {{if eq .message.Durable false}} checked="checked" {{end}}>
                                否
                            </label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label"><span class="text-danger"> * </span>是否验证</label>
                        <div class="col-sm-4">
                            <label class="radio-inline">
                                <input type="radio" name="is_need_token" value="1" {{if eq .message.IsNeedToken true}} checked="checked" {{end}} >
                                是
                            </label>
                            <label class="radio-inline">
                                <input type="radio" name="is_need_token" value="0" {{if eq .message.IsNeedToken false}} checked="checked" {{end}} >
                                否
                            </label>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label"><span class="text-danger"> * </span>验证Token</label>
                        <div class="col-sm-4">
                            <input type="text" name="token" class="form-control" value="{{.message.Token}}" placeholder="验证Token" required>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">消息备注</label>
                        <div class="col-sm-4">
                            <input type="text" name="comment" class="form-control" value="{{.message.Comment}}" placeholder="消息备注">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <button type="button" name="submit" onclick="Form.ajaxSubmit(this.form, true)" class="btn btn-success">保存</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>